
Version:=0.5
ModuleName:=imspector

Objcet:=$(ModuleName).tgz
ObjectDir:=$(ModuleName)-$(Version)
ObjcetSource:=$(ModuleName)-$(Version).tar.gz

DependFiles:=

InstallDirTmp:=usr/local
InstallDir:=/$(InstallDirTmp)
InstallLib:=$(InstallDirTmp)/lib

Config:=./configure --prefix=$(InstallDir)

Patch:= patch -p0 < imspector.patch

.PHONY: all clean dist_clean

test:

all:$(Objcet) 

$(Objcet):$(ObjcetSource)
	tar -xzf $(ObjcetSource)
	$(Patch)
	$(MAKE) -C $(ObjectDir) 
	$(MAKE) -C $(ObjectDir) install DESTDIR=`pwd`/
	cp -rf imspector.conf usr/etc/imspector/
	cp -rf badwords.txt usr/etc/imspector/
	cp -rf acl.txt usr/etc/imspector/
	tar -cvzf $(Objcet) usr #etc

patch:
	mv $(ObjectDir) $(ObjectDir).new
	tar xzvf $(ObjcetSource)
	diff -Nur $(ObjectDir) $(ObjectDir).new > patch

clean:
	rm -rf usr $(Objcet) etc 

dist_clean:clean
	rm -rf $(ObjectDir) $(ObjcetSource) *.tar.gz *.new
	
include ../Makefile.Res
